Skip to content

Ensure vision analysis errors always include exception trace in logs#839

Closed
aydnOktay wants to merge 2 commits intoNousResearch:mainfrom
aydnOktay:fix/vision-tools-error-logging
Closed

Ensure vision analysis errors always include exception trace in logs#839
aydnOktay wants to merge 2 commits intoNousResearch:mainfrom
aydnOktay:fix/vision-tools-error-logging

Conversation

@aydnOktay
Copy link
Contributor

PR tightens error logging for the vision analysis tool so that failures are always captured with full exception trace information. When vision_analyze_tool encounters an error, it now uses logger.exception instead of a plain logger.error, guaranteeing that exc_info is populated and making it easier to debug real-world issues as well as satisfy the error-logging tests in tests/tools/test_vision_tools.py

@teknium1
Copy link
Contributor

Closing — the code rearrangement moves the availability check later, breaking the fail-fast pattern (downloading/processing images before discovering the client isn't configured). The useful part (adding a log line to the early return) has been applied separately. Thanks for the contribution!

@teknium1 teknium1 closed this Mar 11, 2026
teknium1 added a commit that referenced this pull request Mar 11, 2026
Previously the early return for unconfigured vision model was silent.
Now logs an error so the failure is visible in logs for debugging.

Inspired by PR #839 by aydnOktay.

Co-authored-by: aydnOktay <aydnOktay@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants